<?php

/**
 * Description of backofficeDeleteAction
\* www.teuker.nl - mail@teuker.nl
 * 
 * @author francisc
 */

class backofficeDeleteAction extends sfAction {

    public function execute($request) {
        $reservation_id = $request->getParameter('id');
        
        SqlEngineCore::get()->update(array('table' => 'reservation',
                                           'columns' => array(
                                               'deleted_at' => 'NOW()'),
                                           'where' => array(
                                               'reservation_id' => $reservation_id)));

        return $this->renderText($this->getController()->genUrl('@reservation_list?date=' . date('Y-m-d')));
    }
}
